package cn.zhentao.service.serviceImpl;

import cn.zhentao.mapper.TUserMapper;
import cn.zhentao.pojo.TUser;
import cn.zhentao.mapper.TUserMapper;
import cn.zhentao.service.UserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<TUserMapper, TUser> implements UserService {

    @Override
    public TUser findByOpenid(String openid) {
        QueryWrapper<TUser> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("openid", openid);
        return baseMapper.selectOne(queryWrapper);
    }
}
